<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../head/head.jsp"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<meta content="text/html; charset=utf-8" http-equiv=content-type />
		<link rel="stylesheet" type="text/css" href="<%=path%>/css/body.css" />
		<link rel="stylesheet" type="text/css"
			href="<%=path%>/css/theme/redmond/jquery-ui-1.8.1.custom.css" />
		<link rel="stylesheet" type="text/css"
			href="<%=path%>/js/vendor/jqgrid/v_3_6_5/css/ui.jqgrid.css" />
		<link rel="stylesheet" type="text/css"
			href="<%=path%>/js/vendor/formValidator/1_6_2/css/validationEngine.jquery.css" />
		<script type="text/javascript"
			src="<%=path%>/js/vendor/jquery/v_1_4_2/jquery-1.4.2.min.js">
		</script>
		<script type="text/javascript"
			src="<%=path%>/js/vendor/jquery/v_1_4_2/jquery-ui-1.8.1.custom.min.js">
		</script>
		<script type="text/javascript"
			src="<%=path%>/js/vendor/jquery/v_1_4_2/jquery.form.js">
		</script>
		<script type="text/javascript"
			src="<%=path%>/js/vendor/jqgrid/v_3_6_5/i18n/grid.locale-cn.js">
		</script>
		<script type="text/javascript"
			src="<%=path%>/js/vendor/jqgrid/v_3_6_5/jquery.jqGrid.min.js">
		</script>
		<script type="text/javascript"
			src="<%=path%>/js/vendor/formValidator/1_6_2/jquery.validationEngine-cn.js">
		</script>
		<script type="text/javascript"
			src="<%=path%>/js/vendor/formValidator/1_6_2/jquery.validationEngine.js">
		</script>
		<script type="text/javascript"
			src="<%=path%>/js/vendor/jstree/v_1_0rc2/jquery.jstree.js">
		</script>
		<script type="text/javascript"
			src="<%=path%>/page/system/sys_user_edit.js">
		</script>
		<script type="text/javascript"
			src="<%=path%>/js/common/ui/v_1_0/style.js">
		</script>
		<!-- 部门树 -->
		<script type="text/javascript"
			src="<%=path%>/js/vendor/jstree/v_1_0rc2/jquery.jstree.js">
		</script>
		<link type="text/css" rel="stylesheet"
			href="<%=path%>/js/vendor/jquery/jqueryalert/jquery.alerts.css" />
		<script type="text/javascript"
			src="<%=path%>/js/vendor/jquery/jqueryalert/jquery.alerts.js">
		</script>
		<script type="text/javascript"
			src="<%=path%>/js/vendor/my97/v_4_6/WdatePicker.js">
		</script>
		<title>用户添加页面</title>
	</head>
	<body>
		<form method="post" action="saveSysUser" id="sysUser">
			<fieldset class="rectangle" style="padding: 10px 0px 0px 0px"
				id="rm_searcn_fieldset">
				<legend>
					<label>
						用户基本信息
					</label>
				</legend>
				<div id="errorMessage">
					<s:fielderror />
					<s:actionerror />
					<s:actionmessage />
				</div>
				<div id="dateCheck" class="errorMessage"></div>
				<table class="mainTable">
					<tr>
						<td>
							<label for="realName">
								姓名：
								<font color="red">*</font>
							</label>
						</td>
						<td>
							<input type="text" name="sysUserBean.realName" id="realName"
								value="" class="validate[required,length[0,255]]" />
							<input type="hidden" name="sysUserBean.flag"
								value="${sysUserBean.flag }" />
						</td>
						<td>
							<label style="margin-left: 20px;" for="userName">
								用户名：
								<font color="red">*</font>
							</label>
						</td>
						<td>
							<input type="text" name="sysUserBean.userName" id="userName"
								value="" class="validate[required,length[0,255]]" />
						</td>
						<td>
							<label style="margin-left: 20px;" for="password">
								用户密码：
								<font color="red">*</font>
							</label>
						</td>
						<td>
							<input type="password" name="sysUserBean.password" id="password"
								value="" class="validate[required,length[0,255]]" />
						</td>
						<td>
							<label style="margin-left: 20px;" for="mobile">
								用户手机：
								<font color="red">*</font>
							</label>
						</td>
						<td>
							<input type="text" name="sysUserBean.mobile" id="mobile" value=""
								class="validate[required,custom[mobilephone],length[0,255]]" />
						</td>
					</tr>
					<tr>
						<td>
							<label for="isvalidip">
								是否IP验证：
							</label>
						</td>
						<td style="width: 200px;">
							<s:radio name="sysUserBean.isvalidip"
								list="#{'true':'是','false':'否'}" listKey="key" listValue="value"
								theme="simple" value="false" id="isvalidip" onclick="ipcheck();" />
						</td>
						<td>
							<label style="margin-left: 20px;" for="ip" id="ipTd">
								IP地址：
								<font color="red" id="fontid">*</font>
							</label>
						</td>
						<td>
							<input type="text" name="sysUserBean.ip" id="ip" value=""
								class="validate[required,custom[ip],length[0,255]]" />
						</td>
						<td>
							<label style="margin-left: 20px;" for="isvalidsm">
								是否短信验证：
							</label>
						</td>
						<td style="width: 200px;">
							<s:radio name="sysUserBean.isvalidsm"
								list="#{'true':'是','false':'否'}" listKey="key" listValue="value"
								theme="simple" value="false" id="isvalidsm" />
						</td>
						<td>
							<label style="margin-left: 20px;" for="remark">
								用户备注：
							</label>
						</td>
						<td>
							<input type="text" name="sysUserBean.remark" id="remark" value=""
								class="validate[length[0,4000]]" />
						</td>
					</tr>
					<tr>

						<td>
							<label for="gender">
								性别：
							</label>
						</td>
						<td>
							<s:radio name="sysUserBean.gender" list="genderTag"
								listKey="value" listValue="name" theme="simple"
								value="genderTag[0].value"></s:radio>
						</td>
						<td>
							<label style="margin-left: 20px;" for="birthDay">
								出生日期：
							</label>
						</td>
						<td>
							<input type="text" name="sysUserBean.birthDay"
								readonly="readonly" id="birthDay"
								value="${sysUserBean.birthDay }" onclick="WdatePicker()" />
						</td>
						<td>
							<label style="margin-left: 20px;" for="workYears">
								工作年限：
							</label>
						</td>
						<td>
							<input type="text" name="sysUserBean.workYears" id="workYears"
								value="${sysUserBean.workYears }"
								class="validate[custom[numberFloat]]" />
						</td>
						<td>
							<label style="margin-left: 20px;" for="staffKind">
								人员性质：
							</label>
						</td>
						<td>
							<s:select name="sysUserBean.staffKind" list="staffKindTag"
								listKey="value" listValue="name" theme="simple" />
						</td>
					</tr>
					<tr>
						<td>
							<label for="identityCard">
								身份证号：
							</label>
						</td>
						<td>
							<input type="text" name="sysUserBean.identityCard"
								id="identityCard" value="${sysUserBean.identityCard }"
								maxlength="18" />
						</td>
						<td>
							<label style="margin-left: 20px;" for="isOperatorY">
								操作员：
							</label>
						</td>
						<td>
							<input type="radio" value="true" name="sysUserBean.isOperator"
								id="isOperatorY" checked="checked" onclick="operatorCheck();" />
							<label for="isOperatorY">
								是
							</label>
							<input type="radio" name="sysUserBean.isOperator" value="false"
								id="isOperatorN" onclick="operatorCheck();" />
							<label for="isOperatorN">
								否
							</label>
						</td>
						<td>
							<label style="margin-left: 20px;" for="effectStartDate">
								生效日期：
							</label>
						</td>
						<td>
							<input type="text" name="sysUserBean.effectStartDate"
								readonly="readonly" id="effectStartDate"
								value="${sysUserBean.effectStartDate }" onclick="WdatePicker()" />
						</td>
						<td>
							<label style="margin-left: 20px;" for="effectEndDate">
								失效日期：
							</label>
						</td>
						<td>
							<input type="text" name="sysUserBean.effectEndDate"
								readonly="readonly" id="effectEndDate"
								value="${sysUserBean.effectEndDate }" onclick="WdatePicker()" />
						</td>
					</tr>
					<tr>
						<td>
							<input type="hidden" value="true" name="sysUserBean.disabled"
								id="disabledY" />
						</td>

					</tr>
					<tr>
						<td align="right">
							分配组织机构：
						</td>
						<td align="left" colspan="3">
							<input type="hidden" name="sysUserBean.sysOrganizationIDs"
								id="sysOrganizationIDs" size="80" readonly="readonly"></input>
							<textarea name="sysUserBean.orgNames" id="orgNames" rows=4
								cols=46 readonly="readonly"></textarea>
						</td>

						<td align="left">
							分配角色：
						</td>
						<td align="left" colspan="3">
							<input type="hidden" name="sysUserBean.sysRoleIDs"
								id="sysRoleIDs" size="80" readonly="readonly"></input>
							<textarea name="sysUserBean.roleName" id="roleName" rows='4'
								cols='46' readonly="readonly"></textarea>
						</td>
					</tr>
					

				</table>
			</fieldset>
			<input type="submit" value="保存" id="saveSubmit"
				style="margin-right: 5px" />
			<input type="reset" value="重置" onclick="document.forms[0].reset();"
				id="resetSubmit" style="margin-right: 5px" />
			<input type="button" value="返回" id="backButton"
				style="margin-right: 5px" />
		</form>
		<div class="errbox">
			<ul>
				<li>
					1、保存：保存添加的用户基本信息数据。
				</li>
				<li>
					2、重置：将用户基本信息的数据重置为原始状态。
				</li>
				<li>
					3、返回：返回到用户列表页面。
				</li>
			</ul>
		</div>
		
		<!--企业选择 start -->
		<div id="enterpriseSelect" title="企业信息列表" style="display: none;">
			<form id="searchCondition">
				<table class="mainTable">
					<tr>
						<td>
							企业ID ：
							<input type="text" name="enterpriseBean.enterpriseId" />
						</td>
						<td>
							企业全称：
							<input type="text" name="enterpriseBean.name" />
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<input type="button" value="查询" id="searchButton" />
							<input type="button" value="重置" id="resetButton"
								style="margin-right: 20px" onclick="document.forms[1].reset();" />
						</td>
					</tr>
				</table>
			</form>
			<form id="enterpriseIdForm">
				<table id="enterpriseList"></table>
				<div id="enterPrisePager"></div>
			</form>
		</div>
		<!--企业选择 end -->
		<!--部门选择 start -->
		<div id="deptSelect" title="部门选择" style="display: none;">
			<div style="margin-left: 5px;">
				<br />
				<table width="350" cellspacing="0" cellpadding="0" align="center">
					<tr>
						<td width="350" height="300" style="border: 1px solid #a6c9e2;"
							valign="top">
							<div
								style="margin-left: 10px; margin-right: 10px; display: block"
								id="originaDiv">
								<div id="udept_tree"></div>
							</div>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<!--部门选择 end -->
		<div id="sysRoleSelect" title="角色选择" style="display: none;">
			<div style="margin-left: 5px;">
				<br />
				<table width="350" cellspacing="0" cellpadding="0" align="center">
					<tr>
						<td width="350" height="300" style="border: 1px solid #a6c9e2;"
							valign="top">
							<div
								style="margin-left: 10px; margin-right: 10px; display: block"
								id="originaDiv">
								<table id="sysRoleList"></table>
							</div>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<div id="organizationSelect" title="组织机构选择" style="display: none;">
			<div style="float: left; margin-left: 20px;">
				<br />
				<table cellspacing="0" cellpadding="0" align="center"
					style="border: 1px solid #a6c9e2;">
					<tr>
						<td align="left">
							<table width="350" cellspacing="0" cellpadding="0" align="center">
								<tr>
									<td width="350" height="300"
										style="border: 0.3px solid #a6c9e2;">
										<div style="overflow: auto; height: 100%">
											<div id="sysOrganizationTree"></div>
										</div>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</div>

	</body>
</html>